<template>
  <div>
    <div @click="goback" v-show="this.$route.meta.isShow_top" class="top">
      <p class="top_nav">
        <van-icon name="share" color="black" size="20" style="margin-top:13%;margin-left:-10%" />
      </p>
    </div>
    <router-view />
    <div style="width:100%;height:64px" v-show="this.$route.meta.isShow"></div>
    <Tabbar :items="items" :indexapp="0" v-show="this.$route.meta.isShow" />
  </div>
</template>

<script>
import Tabbar from "./components/Tabbar";
export default {
  components: {
    Tabbar,
  },
  data() {
    return {
      items: [
        {
          title: "首页",
          icon: require("./assets/Slide/home.png"),
          icon_active: require("./assets/Slide/home-active.png"),
          path: "/",
        },
        {
          title: "分类",
          icon: require("./assets/Slide/category.png"),
          icon_active: require("./assets/Slide/category-active.png"),
          path: "/category",
        },
        {
          title: "购物车",
          icon: require("./assets/Slide/Cart.png"),
          icon_active: require("./assets/Slide/Cart-active.png"),
          path: "/cart",
        },
        {
          title: "我的",
          icon: require("./assets/Slide/icon_mine.png"),
          icon_active: require("./assets/Slide/icon_mine-active.png"),
          path: "/mine",
        },
      ],
    };
  },
  methods: {
    goback() {
      this.$router.go(-1);
    },
  },
};
</script>

<style scoped>
.top {
  width: 35px;
  height: 35px;
  margin-top: 2%;
  margin-left: 2%;
  border-radius: 50%;
  position: fixed;
  text-align: center;
  z-index: 123;
  border: 2px solid rgb(255, 255, 255);
}
.top_nav {
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: white;
  text-align: center;
  margin-left: 10%;
  margin-top: 10%;
}
</style>